<template>
  <h1>商家信息</h1>
   <div v-for="business in businessList" :key="business.businessId">
      ***{{business}}****
   </div>
</template>

<script setup>
import { ref,onMounted,getCurrentInstance } from "vue";

  const {proxy} = getCurrentInstance();

  const businessList = ref([]);

  const getAllBusiness = ()=>{
    proxy.$axios({
      method: 'post',
      url:'/business/all',
      data: {
        pageNow: 1,
        pageCount: 3,
        businessName: "羊肉",
        businessAddress: "新乡"
      }
    }).then(res=>{
        let resultBean = res.data;
        if(resultBean.code == 200){
          businessList.value = resultBean.data.data;
        }
    })
  }


  onMounted(()=>{
    getAllBusiness();
  })

</script>
